package com.devunion.salon.ajax.redirect;

import org.springmodules.xt.ajax.AjaxAction;
import org.springmodules.xt.ajax.AjaxSubmitEvent;
import org.springmodules.xt.ajax.action.RedirectAction;
import org.springmodules.xt.ajax.validation.SuccessRenderingCallback;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Timoshenko Alexander 02.10.2008 : 0:29:16
 */
public class PaymentSuccessRedirect implements SuccessRenderingCallback {
    public AjaxAction[] getSuccessActions(AjaxSubmitEvent event) {
        List<AjaxAction> result = new ArrayList<AjaxAction>();
        result.add(new RedirectAction("/payment.do", event.getModel()));
        return result.toArray(new AjaxAction[0]);  
    }
}
